package net.dengzixu.java.homework.period10;

import java.util.Scanner;

/**
 * @author Deng Zixu <admin@dengzixu.com>
 */
public class Period10Homework1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个整数: ");
        System.out.println(total(scanner.nextInt()));
    }

    public static int total(int n) {
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += n * 10 + 2;
        }
        return sum;
    }
}
